package net.service;

import net.common.ServiceResponse;
import net.pojo.Product;
import net.pojo.ProductJo;
import net.pojo.ProductVo;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ProductService {
    List<Product> findAll();
    List<Product> search(ProductVo productVo);
    ServiceResponse addProduct(Product product, @RequestParam(required = false, value = "prfie") MultipartFile file, HttpServletRequest request);
    Product findById(String id);
    int deleteById(String id);
    ServiceResponse updateProduct(Product product);
    List<ProductJo> findByCid(Integer cid);
    List<Product> searchProduct(String name);
    List<Product> countHotSaleProducts(String day);

}
